X Windows Functions - Window XCreateWindow(display, parent, x, y, width, height, border_width, depth, class, visual, valuemask, attributes)What links here?
Window XCreateWindow(
      Display              *display,
      Window                parent,
      int                   x,
      int                   y,
      unsigned int          width, height,
      unsigned int          border_width,
      int                   depth,
      unsigned int          class,
      Visual               *visual,
      unsigned long         valuemask,
      XSetWindowAttributes *attributes);


arguments
display
Specifies the connection to the X server.
parent
Specifies the parent window.
x, y
Specify the x and y coordinates, which are the top-left outside corner of the window's borders and are relative to the inside of the parent
width, height
Specify the width and height, which are the created window's inside dimensions and do not include the created window's borders window's borders.
border_width
Specifies the width of the created window's border in pixels.
depth
Specifies the window's depth. A depth of CopyFromParent means the depth is taken from the parent.
class
Specifies the created window's class. You can pass InputOutput, InputOnly, or CopyFromParent. A class of CopyFromParent means the class is taken from the parent.
visual
Specifies the visual type. A visual of CopyFromParent means the visual type is taken from the parent.
valuemask
Specifies which window attributes are defined in the attributes argument. This mask is the bitwise inclusive OR of the valid attribute mask bits. If valuemask is zero, the attributes are ignored and are not referenced.
attributes
Specifies the structure from which the values (as specified by the value mask) are to be taken. The value mask should have the appropriate bits set to indicate which attributes have been set in the structure.


The XCreateWindow function creates an unmapped subwindow for a specified parent window, returns the window ID of the created window, and causes the X server to generate a CreateNotify event. The created window is placed on top in the stacking order with respect to siblings. The coordinate system has the X axis horizontal and the Y axis vertical with the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms of pixels, and coincide with pixel centers. Each window and pixmap has its own coordinate system. For a window, the origin is inside the border at the inside, upper-left corner.

The border_width for an InputOnly window must be zero, or a BadMatch error results. For class InputOutput, the visual type and depth must be a combination supported for the screen, or a BadMatch error results. The depth need not be the same as the parent, but the parent must not be a window of class InputOnly, or a BadMatch error results. For an InputOnly window, the depth must be zero, and the visual must be one supported by the screen. If either condition is not met, a BadMatch error results. The parent window, however, may have any depth and class. If you specify any invalid window attribute for a window, a BadMatch error results.

The created window is not yet displayed (mapped) on the user's display. To display the window, call XMapWindow(). The new window initially uses the same cursor as its parent. A new cursor can be defined for the new window by calling XDefineCursor(). The window will not be visible on the screen unless it and all of its ancestors are mapped and it is not obscured by any of its ancestors.

XCreateWindow does not clear the window when it is created.

XCreateWindow can generate BadAlloc BadColor, BadCursor, BadMatch, BadPixmap, BadValue, and BadWindow errors.

error results
BadAlloc
The server failed to allocate the requested resource or server memory.
BadColor
A value for a Colormap argument does not name a defined Colormap.
BadCursor
A value for a Cursor argument does not name a defined Cursor.
BadMatch
The values do not exist for an InputOnly window.
BadMatch
Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request.
BadPixmap
A value for a Pixmap argument does not name a defined Pixmap.
BadValue
Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error.
BadWindow
A value for a Window argument does not name a defined Window.
X Windows Functions - Window XCreateWindow(display, parent, x, y, width, height, border_width, depth, class, visual, valuemask, attributes)
filename:X Windows Functions - Window XCreateWindow(display, parent, x, y, width, height, border_width, depth, class, visual, valuemask, attributes)
filename:X%20Windows%20Functions%20%2D%20Window%20XCreateWindow%28display%2C%20parent%2C%20x%2C%20y%2C%20width%2C%20height%2C%20border_width%2C%20depth%2C%20class%2C%20visual%2C%20valuemask%2C%20attributes%29
last edit:January 05 2013 19:01:50 (4138 days ago)
ct = 1714990600.000000 = May 06 2024 06:16:40
ft = 1357430510.000000 = January 05 2013 19:01:50
dt = 357560090.000000